﻿using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace MidimediaFinder
{
    public class PromotionViewModel : INotifyPropertyChanged
    {
        private string Name;
        private string Distance;
        private Uri ImageUri;
        private string Hint;
        private Uri Icon;
        public promotion _Item;

        public PromotionViewModel()
            : base()
        {
            
        }
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string _Name
        {
            get
            {
                return Name;
            }
            set
            {
                if (value !=Name)
                {
                    Name = value;
                    NotifyPropertyChanged("Name");
                }
            }
        }

        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string _Distance
        {
            get
            {
                return Distance;
            }
            set
            {
                if (value != Distance)
                {
                    Distance = value;
                    NotifyPropertyChanged("Distance");
                }
            }
        }

        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public Uri _ImageUrl
        {
            get
            {
                return ImageUri;
            }
            set
            {
                if (value != ImageUri)
                {
                    ImageUri = value;
                    NotifyPropertyChanged("ImageUri");
                }
            }
        }

        public Uri _Icon
        {
            get
            {
                return Icon;
            }
            set
            {
                if (value != Icon)
                {
                    Icon = value;
                    NotifyPropertyChanged("Icon");
                }
            }
        }

        public string _Hint
        {
            get
            {
                return Hint;
            }
            set
            {
                if (value != Hint)
                {
                    Hint = value;
                    NotifyPropertyChanged("Hint");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}